Actions in Eggplant DAI
With Eggplant DAI, you create models of your systems under test (SUTs) so that Eggplant DAI can use its algorithms to generate tests on your system. Models are composed of states and actions. States are things such as individual screens in an interface. Actions are things that users do in a given screen, or that move users between screens.
When you run a model, the Eggplant DAI engine chooses the path to follow, determining each action based on its algorithm and what steps are possible. To run tests against your SUTs, you link SenseTalk snippets from the Fusion Engine to your actions.
For detailed information about states, see Defining States in Eggplant DAI.
Types of Actions
There are three types of actions in Eggplant DAI:
- Normal: These actions don't need to execute in any particular order relative to other actions. This is the most common action type.
- Sequent: These actions must execute in a specific order relative to certain other actions.
- Previous: These actions return the model to its previous state—that is, the state that caused the transition to the current state.
To change an action's type, select an action, then use the Type list menu in the Action Properties tab to select the desired action type. See Setting Action Properties for more information about action properties.
Linking an Action Back to the Same State
The Previous action type is the only type whose action is predefined specifically to cause a state change. The other action types perform whatever actions are defined in the attached SenseTalk snippets. Therefore, if you want an action to call a new state, the snippet code must explicitly make that happen.
The default behavior of the model is to stay within the same state. A state change occurs only when a state change is called by an action. For example, if the action called was to click a button or enter text in a field in a UI, the action would be performed, then the Eggplant DAI algorithm would choose its next action from within the same state—assuming the action itself didn't cause a state change.
In other words, no action is required (or available) to link an action back to its parent state. All actions remain within their state unless a new state is specifically requested by the attached snippet.